-- GENERATED SPELL FOR [Time-Lost Scryer] --


function spell0_18319(pUnit, Event) --@Arcane Destruction,n/a--
pUnit:FullCastSpellOnTarget(32689,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18319', 589, 1)
end

function spell1_18319(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(22273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18319', 597, 1)
end

function spell2_18319(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(33989,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18319', 676, 1)
end

function spell3_18319(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17138,pUnit)
pUnit:RegisterEvent('Sorts_18319', 1500, 1)
end

function spell4_18319(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17843,pUnit)
pUnit:RegisterEvent('Sorts_18319', 1500, 1)
end

function spell5_18319(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(12160,pUnit)
pUnit:RegisterEvent('Sorts_18319', 12000, 1)
end

function spell6_18319(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(15981,pUnit)
pUnit:RegisterEvent('Sorts_18319', 12000, 1)
end

function Sorts_18319(pUnit, Event)
local choix_sorts_18319 = math.random(0, 6)
if choix_sorts_18319 == 0 then
pUnit:RegisterEvent('spell0_18319', 1, 1)
end
if choix_sorts_18319 == 1 then
pUnit:RegisterEvent('spell1_18319', 1, 1)
end
if choix_sorts_18319 == 2 then
pUnit:RegisterEvent('spell2_18319', 1, 1)
end
if choix_sorts_18319 == 3 then
pUnit:RegisterEvent('spell3_18319', 1, 1)
end
if choix_sorts_18319 == 4 then
pUnit:RegisterEvent('spell4_18319', 1, 1)
end
if choix_sorts_18319 == 5 then
pUnit:RegisterEvent('spell5_18319', 1, 1)
end
if choix_sorts_18319 == 6 then
pUnit:RegisterEvent('spell6_18319', 1, 1)
end
end

function mob18319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18319', math.random(1500, 3000), 1)
end

function mob18319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18319, 1, 'mob18319_Action')
RegisterUnitEvent(18319, 2, 'mob18319_Leave')
RegisterUnitEvent(18319, 3, 'mob18319_Kill')
RegisterUnitEvent(18319, 4, 'mob18319_Die')
